package mao.exaimnation.guanglianda;
import java.util.Scanner;

public class Main1 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            int score = 0;
            String right = scanner.next();
            String user = scanner.next();
            for (int i = 0; i < right.length(); i++) {
                if (right.charAt(i) == user.charAt(i)){
                    score+=20;
                }else {
                    score-=10;
                    if (score < 0){
                        score=0;
                    }
                }
            }
            System.out.println(score);
        }
    }
}
